def div_apple(apple_count):
    """
    计算平均数
    :param apple_count: 输入个数
    :return: 返回平均数
    """
    person_count = int(input("请输入人数："))
    result = apple_count / person_count
    print(f"每个人{result:.2f}个苹果！")


if __name__ == "__main__":
    try:
        div_apple(10)
    except ValueError as e:
        print(f"{e}输入的人数必须是数字！")
    except ZeroDivisionError as e:
        print(f"{e}输入不能为0，即除数不能为0。")
